Skip to content

feat: host folder grouping for all host types#5358

Open
tomsihap wants to merge 8 commits intoNginxProxyManager:developfrom
tomsihap:develop
Open

feat: host folder grouping for all host types#5358
tomsihap wants to merge 8 commits intoNginxProxyManager:developfrom
tomsihap:develop

Conversation

@tomsihap
Copy link

Summary

  • Adds a Folder field to the Edit modal of all 4 host types (Proxy Hosts, Redirection Hosts, Streams, 404 Hosts), backed by meta.folder — no DB migration required
  • Groups hosts by folder in each dashboard table using TanStack Table v8 built-in grouping, with a collapsible folder header row showing enabled/disabled badge counts
  • Extends client-side search to match folder names in addition to existing fields
  • Hosts without a folder appear at the top of the table as a flat list; named folders appear below, collapsed by default

Technical details

  • Data model: meta.folder (string, optional) on existing meta JSON column — zero schema changes
  • Shared infrastructure: TableBody extended with a renderRow escape-hatch (backward-compatible) allowing custom grouped row rendering
  • Reusable component: FolderField combobox reads existing folder names from the React Query cache via prefix-matching (getQueriesData) for autocomplete — no extra API calls
  • TanStack grouping: hidden folder accessor column drives grouping; columnVisibility: { folder: false } keeps it out of rendered cells

Behaviour

Scenario Result
Host without folder Flat list at top (unchanged appearance)
Folder default state Collapsed
Folder persistence None (resets on page load)
Search matches host inside folder Folder header visible, stays closed
Search matches folder name Folder header visible, stays closed
Create folder Type name in Edit modal Folder field
Remove from folder Clear Folder field in Edit modal

Screenshots

image image image image

Test plan

  • Start dev stack: ./scripts/start-dev → open http://localhost:3081
  • Edit a Proxy Host → Details tab → "Folder" field visible below Access List
  • Assign two hosts to the same folder → folder accordéon appears in table
  • Click folder header → expands/collapses
  • Reload page → folders collapsed again
  • Type folder name in search → folder header appears (stays closed)
  • Type domain name in search → matching hosts found regardless of folder
  • Edit host → clear Folder field → host moves back to flat list
  • Repeat above for Redirection Hosts, Streams, 404 Hosts

🤖 Generated with Claude Code

tomsihap and others added 7 commits February 28, 2026 11:44
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Allows users to assign hosts to named folders for visual grouping in
the Proxy Hosts, Redirection Hosts, Streams, and 404 Hosts dashboards.

- Add Folder field (CreatableSelect) to all four host edit modals,
  stored in meta.folder — no database migration required
- Group hosts by folder in each table using TanStack Table v8 built-in
  grouping with a collapsible header row showing status counts
- Hosts without a folder appear at the top as a flat list; named
  folders appear below, collapsed by default
- Extend client-side search to match folder names alongside existing fields
- Add renderRow escape-hatch to TableBody for custom grouped row rendering
- Folder status indicators use Tabler status-lime/status-red dots,
  consistent with the existing host status column
feat: host folder grouping for all host types
@tomsihap
Copy link
Author

Feel free to close if the contributing policy refuses Claude Code. This PR aims to cover this old issue #409

@nginxproxymanagerci
Copy link

Docker Image for build 2 is available on DockerHub:

nginxproxymanager/nginx-proxy-manager-dev:pr-5358

Note

Ensure you backup your NPM instance before testing this image! Especially if there are database changes.
This is a different docker image namespace than the official image.

Warning

Changes and additions to DNS Providers require verification by at least 2 members of the community!

@TheMazeIsAmazing
Copy link

TheMazeIsAmazing commented Mar 5, 2026

Just tried the docker image, this is a great addition!

I've a suggestion regarding the styling of these folders: is it possible to make it more distinct which hosts belong to a folder, and which do not?

Example mock-up image:

image

As you could see, baserow and beszel are attached to a test folder, and librechat isn't.

This would make it much more clear when you have a mix of hosts with / without a folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants